package com.chenxin.common.core.domain;

import java.io.Serializable;

/**
 * 业务过程返回结果
 */
public class ProcResult implements Serializable {
    private static final long serialVersionUID = 1L;

    private String code;
    private String message;

    public ProcResult() {

    }

    public ProcResult(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public static ProcResult success(String message) {
        return new ProcResult("0", message);
    }

    public static ProcResult error(String code, String message) {
        return new ProcResult(code, message);
    }
}
